<?php
/**
 * Created by PhpStorm.
 * User: PanChaoZhi
 * Date: 2017/1/24
 * Time: 17:15
 */

namespace app\models;


class TestModel extends \PDO
{
    public function __construct()
    {
        $dsn = 'mysql:host=localhost;dbname=phpzhi';
        $username = 'root';
        $passwd = 'localhost';
        try {
            parent::__construct($dsn, $username, $passwd);
        } catch (\PDOException $e) {
            echo $e->getMessage();
        }
    }
}